Returns the prefix character for the specified range. Returns an apostrophe (') if the specified range contains a value that was preceded with an apostrophe when it was entered into the worksheet. Returns a blank string if the specified range does not contain a prefix character. Read-only Variant.
expression.PrefixCharacter
expression Required. An expression that returns a Range object.
This example deletes all prefix characters from the active worksheet in Spreadsheet1.
Sub Delete_PrefixCharacters()
Dim rngCell
' Loop through all used cells in the active worksheet.
For Each rngCell In Spreadsheet1.ActiveSheet.UsedRange
' If a prefix character exists, delete it.
If rngCell.PrefixCharacter <> "" Then
rngCell.Value = rngCell.Value
End If
Next
End Sub